<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加型号详细信息</title>
<style type="text/css">
<!--
*{font-size:12px; text-align:center; font-family:Arial, Helvetica, sans-serif;padding:0;margin:0;}
table{margin:0 auto;border-bottom:2px solid #003399; border-right:2px solid #003399}
tr,td{margin:0; padding:0;}
td,th{border:2px solid #003399; border-bottom:0; border-right:0;}
input{text-align:left}
-->
</style>
<script type="text/javascript" src="{{$siteInfo.appUrl}}/js/jquery-1.3.2.min.js"></script>
<script src="{{$siteInfo.appUrl}}/js/main.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
$(function(){
	i = 2;
	$('#addInput').click(function(){
		$('<tr><td><input name="productNumber[]" type="text" size="14" /></td><td><input name="format[]" type="text" size="14" /></td><td><input name="model[]" type="text" size="14" /></td><td><input name="outland1[]" type="text" size="6" /></td><td><input name="outland2[]" type="text" size="6" /></td><td><input name="outland3[]" type="text" size="6" /></td><td><input name="outland4[]" type="text" size="6" /></td><td><input name="hospital1_name[]" type="text" size="14" /></td><td><input name="hospital1_price[]" type="text" size="6" /></td><td><input name="hospital1_person[]" type="text" size="6" /></td><td><input name="hospital1_telephone[]" type="text" size="8" /></td><td><input name="hospital2_name[]" type="text" size="14" /></td><td><input name="hospital2_price[]" type="text" size="6" /></td><td><input name="hospital2_person[]" type="text" size="6" /></td><td><input name="hospital2_telephone[]" type="text" size="8" /></td><td><input name="hospital3_name[]" type="text" size="14" /></td><td><input name="hospital3_price[]" type="text" size="6" /></td><td><input name="hospital3_person[]" type="text" size="6" /></td><td><input name="hospital3_telephone[]" type="text" size="8" /></td><td><select name="classArray[]" size="1" onchange="checkboxShow('+ i +',this.value,{{$num}});" {{if $do == "edit"}}disabled{{/if}}><option value="-1">请选择</option>{{section name=s loop=$classArray.directoryName}}<option value="{{$classArray.directoryName[s].id}}" {{if $list.package.class == $classArray.directoryName[s].id}}selected="selected"{{/if}}>{{$classArray.directoryName[s].name}}</option>{{/section}}</select>{{section name=m loop=$classArray.directoryName}}<span id="package'+i+'_{{$classArray.directoryName[m].id}}" {{if $list.package.class neq $classArray.directoryName[m].id}}style="display:none"{{/if}} width="300">{{section name=s loop=$classArray.directoryName[m].package}}<input type="checkbox" value="{{$classArray.directoryName[m].package[s].id}}" name="packages'+i+'[]" {{section name=more loop=$list.package.more}}{{if $list.package.more[more] eq $classArray.directoryName[m].package[s].id}}checked{{/if}}{{/section}}/>{{$classArray.directoryName[m].package[s].name}}{{/section}}<input type="checkbox" name="self[]" id="self{{$classArray.directoryName[m].id}}_'+i+'" onclick="inputLive(\'{{$classArray.directoryName[m].id}}_'+i+'\');" value="{{$classArray.directoryName[m].id}}_'+i+'" />自定义<input type="text" name="other[]" id="other{{$classArray.directoryName[m].id}}_'+i+'" value="" style="display:none"/></span>{{/section}}</td></tr>').appendTo('#urlList');
		i++;	
	});
	$('#form1').submit(function(){
		window.opener.document.getElementById("p_message").innerHTML = "已提交";
		window.opener.document.getElementById("time").value="{{$time}}";
		window.opener.document.getElementById("rand").value="{{$rand}}";
	});
	$('#cancel').click(function(){
		window.opener.document.getElementById("time").value="{{$time}}";
		window.opener.document.getElementById("rand").value="{{$rand}}";
		window.opener.document.getElementById("save").disabled='';
		window.close();
	});
});
function window.onunload()
{
  window.opener.document.getElementById("save").disabled='';
}
</script>
</head>

<body>
<form action="{{$siteInfo.appUrl}}/admin.php?controller=Admin_Manage&action=Temporary" method="post" name="form1" id="form1">
<table border="0" cellpadding="0" cellspacing="0" id="urlList">
  <tr>
    <td width="100">产品编号</td>
    <td width="100">规格</td>
    <td width="100">型号</td>
    <td width="60">外地参考价格1</td>
    <td width="60">外地参考价格2</td>
    <td width="60">外地参考价格3</td>
    <td width="60">外地参考价格4</td>
    <td width="100">省内三级医院名称</td>
    <td width="60">省内三级医院价格</td>
    <td width="60">省内三级医院采购部门联系人</td>
    <td width="70">省内三级医院采购部门联系电话</td>
    <td width="100">省内二级医院名称</td>
    <td width="60">省内二级医院价格</td>
    <td width="60">省内二级医院采购部门联系人</td>
    <td width="70">省内二级医院采购部门联系电话</td>
    <td width="100">省内二级以下医院名称</td>
    <td width="60">省内二级以下医院价格</td>
    <td width="60">省内二级以下医院采购部门联系人</td>
    <td width="70">省内二级以下医院采购部门联系电话</td>
    <td width="150">组套信息（必填）</td>
  </tr>
  <tr>
    <td><input name="productNumber[]" type="text" size="14" /></td>
    <td><input name="format[]" type="text" size="14" /></td>
    <td><input name="model[]" type="text" size="14" /></td>
    <td><input name="outland1[]" type="text" size="6" /></td>
    <td><input name="outland2[]" type="text" size="6" /></td>
    <td><input name="outland3[]" type="text" size="6" /></td>
    <td><input name="outland4[]" type="text" size="6" /></td>
    <td><input name="hospital1_name[]" type="text" size="14" /></td>
    <td><input name="hospital1_price[]" type="text" size="6" /></td>
    <td><input name="hospital1_person[]" type="text" size="6" /></td>
    <td><input name="hospital1_telephone[]" type="text" size="8" /></td>
    <td><input name="hospital2_name[]" type="text" size="14" /></td>
    <td><input name="hospital2_price[]" type="text" size="6" /></td>
    <td><input name="hospital2_person[]" type="text" size="6" /></td>
    <td><input name="hospital2_telephone[]" type="text" size="8" /></td>
    <td><input name="hospital3_name[]" type="text" size="14" /></td>
    <td><input name="hospital3_price[]" type="text" size="6" /></td>
    <td><input name="hospital3_person[]" type="text" size="6" /></td>
	<td><input name="hospital3_telephone[]" type="text" size="8" /></td>
	<td><select name="classArray[]" size="1" onchange="checkboxShow(1,this.value,{{$num}});" {{if $do == 'edit'}}disabled{{/if}}>
			<option value="-1">请选择</option>
			{{section name=s loop=$classArray.directoryName}}
			<option value="{{$classArray.directoryName[s].id}}" {{if $list.package.class == $classArray.directoryName[s].id}}selected="selected"{{/if}}>{{$classArray.directoryName[s].name}}</option>
			{{/section}}
		</select>
	{{section name=m loop=$classArray.directoryName}}
	<span id="package1_{{$classArray.directoryName[m].id}}" {{if $list.package.class neq $classArray.directoryName[m].id}}style="display:none"{{/if}} width="300">
	{{section name=s loop=$classArray.directoryName[m].package}}
		<input type="checkbox" value="{{$classArray.directoryName[m].package[s].id}}" name="packages1[]" {{section name=more loop=$list.package.more}}{{if $list.package.more[more] eq $classArray.directoryName[m].package[s].id}}checked{{/if}}{{/section}}	
		/>{{$classArray.directoryName[m].package[s].name}}
		{{/section}}
		<input type="checkbox" name="self[]" id="self{{$classArray.directoryName[m].id}}_1" onclick="inputLive('{{$classArray.directoryName[m].id}}_1');" value="{{$classArray.directoryName[m].id}}_1" />自定义
		<input type="text" name="other[]" id="other{{$classArray.directoryName[m].id}}_1" value='' style="display:none"/>
		</span>
	{{/section}}</td>
  </tr>
</table>
<input type="hidden" name="user_id" value="{{$user_id}}" />
<input type="hidden" name="time" value="{{$time}}" />
<input type="hidden" name="rand" value="{{$rand}}" />
<input type="button" id="addInput" value="增加条数" style="text-align:center" /> <input type="submit" value="提交" name="submit" id="submit" style="text-align:center" /> <input type='button' id="cancel" value="关闭" style="text-align:center" />
</form>
</body>
</html>
